﻿using System;
using Microsoft.Xna.Framework;
using WindowsGame.Library;

namespace WindowsGame
{
	public class Camera : ICamera
	{
		public void Initialize(Vector3 viewPosition, Single fieldOfView, Single aspectRatio, Single nearPlane, Single farPlane)
		{
			ViewMatrix = Matrix.CreateLookAt(viewPosition, Vector3.Zero, Vector3.Up);
			ProjectionMatrix = Matrix.CreatePerspectiveFieldOfView(fieldOfView, aspectRatio, nearPlane, farPlane);
		}

		/// <summary>
		/// A global view matrix since it never changes
		/// </summary>
		public Matrix ViewMatrix { get; private set; }

		/// <summary>
		/// A global projection matrix since it never changes
		/// </summary>
		public Matrix ProjectionMatrix { get; private set; }
	}
}